<html xmlns="http://www.w3.org/1999/xhtml">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../govdoc_header_old.jsp"%>
<%@ include file="/WEB-INF/jsp/ctp/portal/common/components_theme.jsp"%>


<c:set var="isNotG6S" value="${!(v3x:getSysFlagByName('sys_isG6S'))}"/>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
<title></title>
<link rel="stylesheet" type="text/css" href="<c:url value="/apps_res/isearch/css/isearch.css${v3x:resSuffix()}" />"></link>
<script type="text/javascript" charset="UTF-8" src="${path}/apps_res/govdoc/js/query/query_condition.js${ctp:resSuffix()}"></script>
<script type="text/javascript" charset="UTF-8" src="${path}/common/js/ui/calendar/calendar-debug.js${ctp:resSuffix()}"></script>
<script type="text/javascript" charset="UTF-8" src="${path}/common/js/ui/calendar/calendar-language.js${ctp:resSuffix()}"></script>
<script type="text/javascript" charset="UTF-8" src="${path}/common/js/ui/seeyon.ui.common-debug.js?${ctp:resSuffix()}"></script>
<script type="text/javascript">
var listType = "listQuery";
var govdocType = "";
var displayLabel = "<${ctp:i18n('govdoc.custom.type.msg')}>";
var queryDialogTitle = '<fmt:message key="edoc.custom.classification"/>';

showCtpLocation("F20_search");

$(document).ready(function () {
	loadUE();
	loadDeduplication();
	setHistorySerachCondition();
});


var secretLevelList = "${ctp:escapeJavascript(secretLevels)}";
var urgentLevelList = "${ctp:escapeJavascript(urgentLevels)}";
var unitLevelList = '${ctp:escapeJavascript(unitLevels)}';
var keepPeriodList = '${ctp:escapeJavascript(keepPeriods)}';
var sendTypeJsonList = '${ctp:escapeJavascript(sendTypesJson)}';
var docTypeJsonList = '${ctp:escapeJavascript(docTypesJson)}';
var customConnfigItemsList = '${ctp:escapeJavascript(customConnfigItems)}';
var listHistoryEnum = '${ctp:escapeJavascript(listHistoryEnum)}';

var secretLevelOptions = new Array();
var urgentLevelOptions = new Array();
var unitLevelOptions = new Array();
var keepPeriodOptions = new Array();
var sendTypeOptions = new Array();
var docTypeOptions = new Array();
var customConfigArray = new Array();

var isNotG6S = '${isNotG6S}';
var sendTypeList = '${ctp:escapeJavascript(sendTypeList)}';
var docTypeList = '${ctp:escapeJavascript(docTypeList)}';

var arr = new Array();
if(secretLevelList != "") {
	try {
 		arr = eval("(" + secretLevelList + ")");	
 	} catch(e) {}
	for(var i = 0; i<arr.length; i++){
		secretLevelOptions[i] = {text:arr[i].showvalue, value:arr[i].enumvalue};
	}
}
if(urgentLevelList != "") {
	try {
 		arr = eval("(" + urgentLevelList + ")");	
 	} catch(e) {}
	for(var i = 0; i<arr.length; i++){
		urgentLevelOptions[i] = {text:arr[i].showvalue, value:arr[i].enumvalue};
	}
}
if(unitLevelList != "") {
	try {
 		arr = eval("(" + unitLevelList + ")");	
 	} catch(e) {}
	for(var i = 0; i<arr.length; i++){
		unitLevelOptions[i] = {text:arr[i].showvalue, value:arr[i].enumvalue};
	}
}
if(keepPeriodList != "") {
	try {
 		arr = eval("(" + keepPeriodList + ")");	
 	} catch(e) {}
	for(var i = 0; i<arr.length; i++){
		keepPeriodOptions[i] = {text:arr[i].showvalue, value:arr[i].enumvalue};
	}
}
if(sendTypeJsonList != "") {
	try {
 		arr = eval("(" + sendTypeJsonList + ")");
 	} catch(e) {}
	for(var i = 0; i<arr.length; i++){
		sendTypeOptions[i] = {text:arr[i].showvalue, value:arr[i].enumvalue};
	}
}
if(docTypeJsonList != "") {
	try {
 		arr = eval("(" + docTypeJsonList + ")");
 	} catch(e) {}
	for(var i = 0; i<arr.length; i++){
		docTypeOptions[i] = {text:arr[i].showvalue, value:arr[i].enumvalue};
	}
}
//设置历史自定义查询条件
if(customConnfigItemsList != "") {
	try {
 		arr = eval("(" + customConnfigItemsList + ")");
 	} catch(e) {}
	for(var i = 0; i<arr.length; i++){
		customConfigArray[i] = {text:arr[i].configCategory, value:arr[i].configValue};
	}
}

//设置不显示增加外部单位连接
var hiddenAddExternalAccount_mainSendToUnit = true;
 
hiddenOnChanageAccountForExchangeAccount_mainSendToUnit=false;
hiddenOnChanageAccountForOrgTeam_mainSendToUnit=false;
hiddenOnChanageAccountForExchangeAccount_sendUnit=false;
hiddenOnChanageAccountForOrgTeam_sendUnit=false;

disabledAccountSelectorForOrgTeam_mainSendToUnit=false;
disabledAccountSelectorForExchangeAccount_mainSendToUnit=false;
disabledAccountSelectorForExchangeAccount_sendUnit=false;
disabledAccountSelectorForOrgTeam_sendUnit=false;
</script>
<style>
.miniCalendar {
	height: auto;
}
input[type='text']{
	width:155px;
	height: 20px;
}
select{
	width:155px;
	height: 20px;
}
.sectionTitleLine {
	background:#FAFAFA;
}
.sectionTitleLine table{
	/*table-layout:fixed;*/
}
.sectionBody table{
	background: #FAFAFA;
}
.sectionBody {
	background: #FAFAFA;
}
#searchCondition td{
    padding: 3px 3px 3px 10px;
}
#searchCondition tr{
    height:24px;
}
#searchCondition select{
    height:27px!important;
    width:236px!important;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
    transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s;
}
#searchCondition select:hover,#searchCondition input:hover{
	 border: 1px solid #57B4E7;
}
#searchCondition input{
    height:24px;
    width:235px;
    border: 1px solid #CCCCCC;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
    transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s;
}
#searchCondition{
	margin: auto;background:#FAFAFA;
	/* height: auto!important; */
	/* 超出高度后纵向出现滚动条 */
	overflow-y: auto;
}
.layout_north{ overflow-y:hidden}
</style>
</head>
<body scroll="no" style="overflow-y: hidden;"><!-- 去除最外侧滚动条 -->
<v3x:selectPeople id="mainSendToUnit" panels="Account,Department,ExchangeAccount,OrgTeam" selectType="Account,Department,ExchangeAccount,OrgTeam" departmentId="${sessionScope['com.seeyon.current_user'].departmentId}" jsFunction="setMainSendUnitFields(elements)" viewPage="" minSize="0" maxSize="1" showAllAccount="true" />
<v3x:selectPeople id="sendUnit" panels="Account,Department,ExchangeAccount,OrgTeam" selectType="Account,Department,ExchangeAccount,OrgTeam" departmentId="${sessionScope['com.seeyon.current_user'].departmentId}" jsFunction="setSendUnitFields(elements)" viewPage="" minSize="0"  maxSize="1" showAllAccount="true" />
<v3x:selectPeople id="sendDepartment" panels="Department" selectType="Department" departmentId="${sessionScope['com.seeyon.current_user'].departmentId}" jsFunction="setSendDepartmentFields(elements)" viewPage="" minSize="0"  maxSize="1" showAllAccount="true" />

<input type="hidden" name="conditionColumns" id="conditionColumns"></input>
<input type="hidden" name="conditionColumnLabels" id="conditionColumnLabels"></input>

<div id="layout" class="comp bg_color" comp="type:'layout'">
<div class="layout_north" layout="height:300,minHeight:100,spiretBar:{show:true,handlerT:function(){layout.setNorth(0);},handlerB:function(){layout.setNorth(300);}}">

<table width="100%"  border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="150">

<div class="portal-layout-cell" style="margin:0">

<div class="portal-layout-cell_head">
	<div class="portal-layout-cell_head_l"></div>
	<div class="portal-layout-cell_head_r"></div>
</div>

<!-- 查询条件设置 -->
<form id="conditionForm" name="conditionForm" method="post" target="dataIFrame">
<input type="hidden" id="statTitle" name="statTitle" value="${ctp:i18n('govdoc.document.query.result')}"></input>
<input type="hidden" id="listType" name="listType" value="${ctp:escapeJavascript(param.listType) }"></input>
<input type="hidden" id="deduplication" name="deduplication" value="false"></input>
<input type="hidden" id="startTime" name="startTime" value=""></input>
<input type="hidden" id="createTime" name="createTime" value=""></input>
<input type="hidden" id="signingDate" name="signingDate" value=""></input>
<input type="hidden" id="packTime" name="packTime" value=""></input>
<input type="hidden" id="recieveDate" name="recieveDate" value=""></input>
<input type="hidden" id="registerDate" name="registerDate" value=""></input>
<input type="hidden" id="printingDate" name="printingDate" value=""></input>
<input type="hidden" name="customColumns" id="customColumns"></input>
<input type="hidden" name="customDisplayColumns" id="customDisplayColumns"></input>
<input type="hidden" name="conditionParams" id="conditionParams" value=""></input>
<input type="hidden" name="orderColumnForExport" id="orderColumnForExport" value=""></input>
<input type="hidden" id="isNeedSearchSummaryExtend" name="isNeedSearchSummaryExtend" value="false"></input>
<table border="0" cellSpacing="0" cellPadding="0" width="100%" class="portal-layout-cell-right">
<tr>
	<td class="sectionBody sectionBodyBorder" align="center" style="background:#FAFAFA;">
		<TABLE width="100%" cellspacing="0" cellpadding="0" border="0" style="background:#FAFAFA;">
			<tr>
				<td style="padding-top:2px;padding-left:5px;" valign="top" align="left">
<%--					<fmt:message key='edoc.custom.querycondition'/> ：<input type="button" onclick="openConditionDialog()"  value="<fmt:message key='govdoc.add.searchCondition.label'/>" class="button-default_emphasize"></input>--%>
				</td>
			</tr>
			<TR>
				<TD VALIGN="top" align="center">
				<div id="searchCondition" style="overflow-y:auto">	<%-- 改动 --%>
				<TABLE cellspacing="0" border="0">
					<TR id="categoryTr">
						<%--类别 --%>
						<TD align="right"><fmt:message key='edoc.sorttype.label'/>:</TD>
						<TD colspan="4" align="left">
						  	<select name="govdocType" id="govdocType" onChange="clearDocSetting();">
					  			<c:if test="${isNotG6S}">
						  			<option value=""><fmt:message key='common.pending.all'/></option><%-- 全部 --%>	
								</c:if>
								<option value="1"><fmt:message key='edoc.docmark.inner.send'/></option><%-- 发文 --%>
								<option value="2,4" selected="selected"><fmt:message key='edoc.docmark.inner.receive'/></option><%-- 收文 --%>
								<c:if test="${isNotG6S}">
									<option value="3"><fmt:message key='edoc.docmark.inner.signandreport'/></option><%-- 签报 --%>
								</c:if>
							</select>
						</TD>
					</TR>
					
					<TR id="titleSubjectTr">
						<%--公文标题--%>	
						<TD align="right" width="55"><fmt:message key='govdoc.element.gb.title'/>:</TD>
						<TD align="left" width="260"><input type="text" name="subject" id="subject" maxlength="100"></input></TD>
						
						<%-- 内部文号 --%>	
						<TD align="right" width="55"><fmt:message key='common.edoc.inner.mark.number.label'/>:</TD>
						<TD align="left" width="260"><input type="text" name="serial_no" id="serial_no" maxlength="100"></input></TD>
					</TR>
					
					<TR id="edocMarkTr">
						<%-- 公文文号 --%>
					  	<TD align="right"><fmt:message key='edoc.element.receive.doc_mark'/>:</TD>
					  	<TD align="left"><input type="text" name="doc_mark" id="doc_mark" maxlength="100"></input></TD>
						  	
					  	<%-- 行文类型 --%>
					  	<TD align="right"><fmt:message key='edoc.element.sendtype'/>:</TD>
					  	<TD align="left">
							<select name="send_type" id="send_type">
								<option value="" selected><fmt:message key='common.pleaseSelect.label'/></option>
								<c:forEach items="${sendTypeList }" var="bean">
						        <option value="${bean.enumvalue }">${bean.showvalue }</option>	
						        </c:forEach>
							</select>
					  	</TD>
				  	</TR>
						
					<TR id="edocTypeTr">
						<%-- 公文种类 --%>
						<TD align="right"><fmt:message key='govdoc.element.gb.type'/>:</TD>
						<TD align="left">
							<select id="doc_type" name="doc_type">
				   				<option value="" selected><fmt:message key='common.pleaseSelect.label'/></option>
				   				<c:forEach items="${docTypeList }" var="bean">
						        <option value="${bean.enumvalue }">${bean.showvalue }</option>	
						        </c:forEach>
							</select>	
						</TD>
						  
						<%-- 发起日期 --%>
						<TD align="right"><fmt:message key='edoc.supervise.serach.startdate'/>:</TD>					
						<TD align="left">
							<div style='position: relative;display: inline-block;'><input type="text" name="from_createTime" id="from_createTime" readonly="readonly"  style="width:112px;"></input><span class="calendar_icon" style="position: absolute;font-size:14px;right: 4px;top: 6px;" onclick="showCalendar('from_createTime');"></span></div>
							-
							<div style='position: relative;display: inline-block;'><input  style="width:112px;" type="text" name="to_createTime" id="to_createTime" readonly="readonly" ></input><span class="calendar_icon" style="position: absolute;font-size:14px;right: 4px;top: 6px;" onclick="showCalendar('to_createTime');"></span></div>
						</TD>
					</TR>
					
					<TR id="writePersonTr">
						<%-- 拟稿人--%>
						<TD id="createPersonTd0" align="right"><fmt:message key='edoc.element.author'/>:</TD>
						<%-- 原拟稿人解析为了发起人 <TD align="left"><input type="text" name="startUserName" id="startUserName"></input></TD> --%>
						<TD id="createPersonTd1" align="left"><input type="text" name="create_person" id="create_person" maxlength="100"></input></TD>
						
						<%-- 发文单位--%>
						<TD align="right"><fmt:message key='edoc.element.sendunit'/>:</TD>					
						<TD align="left"><input type="text" name="send_unit" id="send_unit" maxlength="100"></input></TD>
						<TD align="left"><input type="hidden" name="sendUnitId"  id="sendUnitId"></input></TD>
					</TR>
						
					<TR id="sendUnitTr">
						<%-- 主送单位--%>
						<TD align="right"><fmt:message key='edocLang.edoc_send_main_unit'/>:</TD>
						<TD align="left"><input type="text" name="send_to" id="send_to" maxlength="100"></input><input type="hidden" name="sendToId"  id="sendToId"></input></TD>
						
						<%-- 发文部门--%>
						<TD align="right"><fmt:message key='edoc.element.senddepartment'/>:</TD>					
						<TD align="left"><input type="text" name="sendDepartment"  id="sendDepartment" maxlength="100"></input></TD>
						<TD align="left"><input type="hidden" name="sendDepartmentId"  id="sendDepartmentId" ></input></TD>
					</TR>	
					
					<TR id="signPersonTr">
						<%-- 签发人--%>
						<TD id="issuerTd0" align="right"><fmt:message key='common.signer.label'/>:</TD>
						<TD id="issuerTd1" align="left"><input type="text" name="issuer" id="issuer" maxlength="100"></input></TD>
						
						<%-- 签发日期--%>
						<TD align="right"><fmt:message key='govdoc.element.gb.sendingdate'/>:</TD>
							<TD align="left"><div style='position: relative;display: inline-block;'><input type="text" readonly="readonly" name="from_signingDate" id="from_signingDate" style="width:112px;"></input><span class="calendar_icon" style="position: absolute;font-size:14px;right: 4px;top: 6px;" onclick="showCalendar('from_signingDate');"></span></div>
								-
								<div style='position: relative;display: inline-block;'><input type="text" readonly="readonly" name="to_signingDate" id="to_signingDate" style="width:112px;"></input><span class="calendar_icon" style="position: absolute;font-size:14px;right: 4px;top: 6px;" onclick="showCalendar('to_signingDate');"></span></div></TD>
						<TD align="left"><a id='reSearchChoiceBtn' onclick='openConditionDialog()'>[修改查询条件]</a></TD>
					</TR>

					<TR>
						<TD id="addConditionTd" colspan="5" style="padding:0"></TD>
					</TR>
					
				</TABLE>		
				</div>
			</TD>
		</TR>		
		
		<TR style="height:28px;valign:top">
			<TD colspan="5" align="center">
				<input type="button" style="width:50px;border-top-width:0px;" class="button-default_emphasize" name="btn" onClick="edocSearch();" value="<fmt:message key='common.button.condition.search.label'/>"></input>&nbsp;&nbsp;&nbsp;&nbsp;
				<input type="button" style="width:75px;border-top-width:0px;" class="button-default-2" onClick="resetForm()"  name="btn" value="<fmt:message key='common.button.reset.label'/>"></input>&nbsp;
			</TD>
		</TR>
		
	</TABLE>
	</td>
</tr>
</table>
</form>

<div class="portal-layout-cell_footer">
	<div class="portal-layout-cell_footer_l"></div>
	<div class="portal-layout-cell_footer_r"></div>
</div>

</div><!-- portal-layout-cell -->
</td>
</tr>
</table>
</div><!-- layout_north -->
	
	
<div class="layout_center" layout="border:true">
<table width="100%" height="61%" border="0" cellspacing="0" cellpadding="0"> <!-- OA-228625:列表余留空白问题，更改高度 -->
<tr>
	<td id="pagebreakspareTd">
	<table width="100%" align="center" id="pagebreakspare" border="0" cellspacing="0" cellpadding="0">
	<tbody>
	<tr align="center">
	<td class="detail-top" valign="top" style="overflow: hidden;">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tbody>
		<tr>
			<td valign="top">
				<div class="break-up" onclick="setNorthHeight('Up')"></div>
			</td>
			<td valign="top">
				<div class="break-down" onclick="setNorthHeight('Down')"></div>
			</td>
		</tr>
		</tbody>
		</table>
	</td>
	</tr>
	</tbody>
	</table>
	</td>
</tr>

<tr>
<td id="toolbars" height="20" valign="top" style="border-top: 1px solid #e3e3e3;border-bottom: 1px solid #e3e3e3;">
<div class="portal-layout-cell" style="margin:0;">

<div class="portal-layout-cell_head">
	<div class="portal-layout-cell_head_l"></div>
	<div class="portal-layout-cell_head_r"></div>
</div>

<table border="0" cellSpacing="0" align="left" cellPadding="0" width="100%" class="portal-layout-cell-right">
<tr>
	<td class="sectionTitleLine" width="160">
		<span class="padding_l_10"><fmt:message key="common.query.result" bundle="${isearchI18N}"/>: <span class="ico16 export_excel_16"></span><a href="javascript:doExcel()"> <fmt:message key='common.export.excel' bundle='${v3xCommonI18N}' /></a></span>
	</td>
	
	<%-- 同一流程只显示最后一条 --%>
	<td class="sectionTitleLine padding_l_5 " style="width:200px;">
		<label class="isGourpBy">
			<input style="width: 20px;" type="checkbox" name="isGourpBy" id="isGourpBy" value="1" <c:if test="${isChecked}">checked</c:if>  />
			<fmt:message key="edoc.list.isGroupBy" />
		</label>
	</td>
	
	<td class="sectionTitleLine padding_l_5 " style="width:300px;">
		<label>
			<input type="checkbox" onClick="viewDocSetting(this);" style="vertical-align:middle;" id="customSearch"></input>&nbsp;<fmt:message key="edoc.custom.query" />
		</label>
		<span id="customQuery" style="display:none;">
			<input id="displayColumnLabels"  type="text" style="text-align:center; line-height: 20px;" onClick="openDocSetting();" value="&lt;${ctp:i18n('govdoc.custom.type.msg') }&gt;" style="width:72.5%; border: 1px solid #CCC;cursor:pointer;"></input>
		</span>
		<input type="hidden" name="displayColumns" id="displayColumns"></input>
	</td>
	<td class="sectionTitleLine padding_l_5 " style="width:300px;">
		<label>
			<input type="checkbox" style="vertical-align:middle;" id="customOrderSearch" <c:if test="${hasConfig}">checked</c:if>></input>&nbsp;<fmt:message key="edoc.custom.order" />
		</label>
		<span id="customOrder" style="<c:if test="${!hasConfig}">display:none;</c:if>">
			<input id="orderColumnLabels"  type="text" style="text-align:center; line-height: 20px;" onClick="openOrderSetting();" value="${orderConfigLabels}" style="width:72.5%; border: 1px solid #CCC;cursor:pointer;" />
		</span>
		<input type="hidden" name="orderColumns" id="orderColumns" value="${orderConfig}" />
		<input type="hidden" name="orderColumnsDefault" id="orderColumnsDefault" value="${orderConfigDefault}" />
		<input type="hidden" name="orderColumnLabelsDefault" id="orderColumnLabelsDefault" value="${orderConfigLabelsDefault}" />
	</td>
	<td class="sectionTitleLine padding_l_5 ">
		<c:if test="${hasDumpData == 'true'}">
			<label>
				<input type="checkbox" onClick="dumpData();" id="dumpDataBox" />&nbsp;<fmt:message key="govdoc.button.dumpData.label.js" />
			</label>
		</c:if>
	</td>
</tr>
</table>
</div><!-- portal-layout-cell -->
</td>
</tr>

<tr>
	<td vAlign="top" style="padding:0 4px 0px 2px;background:#FAFAFA;" height="90%">
		<IFRAME height="100%"  name="dataIFrame" id="dataIFrame" width="100%" frameborder="0"></IFRAME>
	</td>
</tr>
</table>
		
<iframe name="excelIframe" id="excelIframe"  style="display:none;">&nbsp;</iframe>

</div><!-- layout_center -->
</div><!-- layout -->
</body>
</html>
